{{ if $.Param "enableSidebar" }}
<div class="sidebar">
    {{ partial "search/site-search" . }}
    {{ partial "sidebar/site-bio" . }}
    {{ partial "sidebar/custom-home" . }}
    {{ partial "sidebar/list/posts-by-order" . }}

    {{ if and ($.Param "itemsPerCategory") ($.Param "enableHomeSidebarTitles") }}
        {{ $filteredSections := .Site.Sections }}
        {{ range $.Param "notAllowedTypesInHomeSidebar" }}
            {{ $filteredSections = (where $filteredSections "Type" "!=" (lower .)) }}
        {{ end }}

        {{ range $filteredSections }}
        <section class="sidebar-recent">
            <a href="{{ .RelPermalink }}" class="sidebar-recent__title p2">{{ .Title }}</a>
            <ul class="sidebar-recent__ul">
                {{ range first ($.Param "itemsPerCategory") .Pages }}
                    <li>
                        <a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
                    </li>
                {{ end }}
            </ul>
        </section>
        <hr class="hr-fade sidebar-hr" />
        {{ end }}
    {{ end }}
</div>

<div class="taxo-root">
{{ partial "taxonomy/taxonomy-tags" . }}
{{ partial "taxonomy/taxonomy-categories" . }}
{{ partial "taxonomy/taxonomy-series" . }}
</div>
<hr class="hr-fade sidebar-hr" />

{{ end }}